package com.nassir.chatroom.client;

import com.nassir.chatroom.constant.Constant;
import com.nassir.chatroom.socket.SocketClient;
import com.nassir.chatroom.util.DynamicConfig;
import com.nassir.chatroom.util.Logs;

/**
 * 聊天客户端
 * 
 * @author nassir.wen
 * @date 2012-12-3下午5:39:10
 * @Copyright: Copyright (c) 2012
 */
public class TalkClient {

    public static SocketClient socketClient = null;
    
    /**
     * 服务器连接
     */
    public static void connect() {
        String host = DynamicConfig.getInstance().getValue(Constant.SERVER_ADDR);
        int port = DynamicConfig.getInstance().getInt(Constant.SERVER_PORT);
        Logs.info("连接聊天室" + host + ":" + port + "...");
        socketClient = new SocketClient(host, port);
    }

}
